<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>
{$article[0]['Title']}|中国互联网协会第五届全国大学生网络创新应用大赛
</title>
<meta name="description" content="__DESCRIPTION__">
<meta name="keywords" content="__KEYWORDS__">
<link href="__CSS__/common.css" rel="stylesheet" type="text/css" />
<link href="__CSS__/Version4Master.css" rel="stylesheet" type="text/css" />
<link href="__CSS__/team.css" rel="stylesheet" type="text/css" />
<script src="__JS__/jquery-1.8.2.js" type="text/javascript"></script>
<style type="text/css">
	.input-button, .input-submit
	{
		background-color: #005EAC;
		border-color: #B8D4E8 #124680 #124680 #B8D4E8;
		border-style: solid;
		border-width: 1px;
		color: #FFFFFF;
		cursor: pointer;
		font-size: 12px;
		padding: 4px 15px;
		text-align: center;
	}
	#content span
	{
		font-size: 14px;
	}
</style>
</head>
<body>
<div id="container">
    <!--header start-->
	<include file="./Match/Tpl/Include/header.html" /> 
	<!--header stop-->
        <div class="clear">
        </div>
        
    <div id="position">
        <ul class="position">
            <li style="background: url(img/positionL.jpg) no-repeat left; width: 15px;">&nbsp;</li>
            <li style="padding-top: 4px;">您的位置：<a href="{:U('Public/Content/Introduce')}">大赛首页</a>》<a href="{:U('Team/Index/index')}">团队风采</a>》博客博文</li>
            <li style="background: url(img/positionR.jpg) no-repeat right; float: right;">&nbsp;</li>
        </ul>
    </div>
    <div id="left">
        <div id="main">
            <div class="list5">
                <h1 align="center" style="font-size: 20px; font-weight: bold; width: 95%; margin: 3px auto;
                    color: #333; padding: 15px 0; border-bottom: 1px solid #aaa;">
                    {$article[0]['Title']}</h1>
                <div id="content" style="margin: 3px auto; line-height: 25px; font-size: 14px; width: 95%;">
                   <!--内容-->
				   {$article[0]['Content']}
                </div>
                <p align="right" style="font-size: 12px; text-indent: 0px; width: 85%; margin: 5px auto;">
                    作者：<a href="__APP__/{$article[0]['CreateUser']|geturl=###}" style="color: #0099FF;
                        padding: 0 5px 0 5px;">{$article[0]['TrueName']}</a>
                    {$article[0]['CreateDate']}
                    浏览：{$article[0]['ViewCount']}
                    评论：{$article[0]['CommentCount']}
                    
                    </p>
				 <p align="left" style="font-size: 12px; text-indent: 0px; width: 85%; margin: 5px auto;">
				<!-- JiaThis Button BEGIN -->
				
				<!-- JiaThis Button END -->
				</p>
				
            </div>
        </div>
		
		<div id="ctl00_ContentPlaceHolder1_main1" style="float: left;">
			<h3 style="font-size: 18px; line-height: 20px; margin-top: 15px;"> 留言</h3>
			<div id="Commentlist"></div>
		</div>
		<div class="clear" style="height: 25px;"> </div>
		<if condition="$Think.session.loginuser.UserName eq true">
		<div id="main2">
			<h3 style="font-size: 18px; line-height: 20px;"> 发表留言</h3>
			<form action="" method="post" name="aspnetForm"  onsubmit="return doAdd(this)">
			<table id="editor" style="">
				<input type="hidden" value="{$article[0]['Id']}" name="articleid" />
				<tbody>
					<tr>
						<td colspan="2">
							<textarea name="comment" rows="2" cols="20" id="Comment" style="height:150px;width:660px;"></textarea>
						</td>
					</tr>
				</tbody>
			</table>
			<p id="commentTip"></p>
			<p>
				<input name="Submit" value="发表留言" id="Submit" class="input-button" type="submit">
				<input type="reset" value="清空" class="input-button" />
			</p>
			</form>
		</div>
		<else />
		<div id="main2">
			<h3 style="font-size: 18px; line-height: 20px;">发表留言</h3>
			<p></p>
			<div id="ctl00_ContentPlaceHolder1_pnlMsg">
				<h1 style="line-height: 20px; margin-top: 20px; background: url(__IMG__/comment_new.gif) no-repeat top left;padding-left: 20px;">
				注册用户登录后才能发表评论，请<a href="{:U('Public/Index/run')}" style="color: #399AB2;">登录</a>或<a href="{:U('Public/Index/run')}" style="color: #399AB2;">注册</a>。</h1>
			</div>
		</div>
        </if>
        <div class="clear" style="height: 25px;"></div>
        
    </div>
    <div id="sidebar">
        <div class="sidebar1" style="margin-top: 8px; border: none;">
            <h3 style="background-image: url(images/bt_title_blue.gif); color: #1F3E7C; font-size: 14px; background-repeat: no-repeat; border: none;">
                 相关文章</h3>
            <div class="list4">
                 <ul>
					<volist name="aboutBlog" id="vo">
					<li><a href="{:U('Public/Blog/article')}/id/{$vo.Id}">{$vo.Title|msubstr=0,19,'utf-8'}</a></li>
					</volist>
                </ul>
             </div>
         </div>
    </div>
    <div class="clear"></div>
	<!--footer start-->
	<include file="./Match/Tpl/Include/footer.html" /> 
	<!--footer stop-->
</div>
<script type="text/javascript">
	$(function(){
		$('#Commentlist').load('__URL__/BlogComment/id/{$article[0]['Id']}/page/1');
		obj=$("span[act='loadtlog']");
		obj.live("click",function(){
			var href=$(this).attr('href');
			$('#Commentlist').load(href);
		});
		
	});
</script>
<script type="text/javascript">
	function doAdd(form){
		if(doCheckComment()){
			$.ajax({
				url:"__URL__/addBlogComment",
				type:"POST",
				data:$(form).serialize(),
				dataType:"json",
				success:function(res){
					if(res>0){
						$(form).find(":reset").trigger("click");
						$('#Commentlist').load('__URL__/BlogComment/id/{$article[0]['Id']}');
					}else{
						alert('添加失败！');
					}
				}
			});
		}
		
		return false;
	}
	
	function doCheckComment(){
		var name = document.aspnetForm.comment.value;
		if(name==''|| name<4){
			document.getElementById("commentTip").innerHTML="评论内容必须两个字以上！";
			document.getElementById("commentTip").style.color="red";
			return false;
		}else{
			document.getElementById("commentTip").innerHTML='';
			return true;
		}
	}
</script>
</body>
</html>
